---
page_title: "cloudflare_waiting_room_rules Resource - Cloudflare"
subcategory: ""
description: |-
  Provides a Cloudflare Waiting Room Rules resource.
---

# cloudflare_waiting_room_rules (Resource)

Provides a Cloudflare Waiting Room Rules resource.

## Example Usage

```terraform
resource "cloudflare_waiting_room_rules" "example" {
  zone_id         = "0da42c8d2132a9ddaf714f9e7c920711"
  waiting_room_id = "d41d8cd98f00b204e9800998ecf8427e"

  rules {
    description = "bypass ip list"
    expression  = "src.ip in {192.0.2.0 192.0.2.1}"
    action      = "bypass_waiting_room"
    status      = "enabled"
  }

  rules {
    description = "bypass query string"
    expression  = "http.request.uri.query contains \"bypass=true\""
    action      = "bypass_waiting_room"
    status      = "enabled"
  }
}
```
<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `waiting_room_id` (String) The Waiting Room ID the rules should apply to. **Modifying this attribute will force creation of a new resource.**
- `zone_id` (String) The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**

### Optional

- `rules` (Block List) List of rules to apply to the ruleset. (see [below for nested schema](#nestedblock--rules))

### Read-Only

- `id` (String) The ID of this resource.

<a id="nestedblock--rules"></a>
### Nested Schema for `rules`

Required:

- `action` (String) Action to perform in the ruleset rule. Available values: `bypass_waiting_room`.
- `expression` (String) Criteria for an HTTP request to trigger the waiting room rule action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the [Waiting Room Rules Docs](https://developers.cloudflare.com/waiting-room/additional-options/waiting-room-rules/bypass-rules/).

Optional:

- `description` (String) Brief summary of the waiting room rule and its intended use.
- `status` (String) Whether the rule is enabled or disabled. Available values: `enabled`, `disabled`.

Read-Only:

- `id` (String) Unique rule identifier.
- `version` (String) Version of the waiting room rule.

## Import

Import is supported using the following syntax:

```shell
$ terraform import cloudflare_waiting_room_event.default <zone_id>/<waiting_room_id>
```
